<!--
  @author nowind
  @since 17/07/23 14:34
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
</head>
<body>
<div class="layui-fluid">
    <blockquote class="layui-crumb">
        <a lay-href="/push/noticeApp/list.action">APP公告管理</a>>
        <span th:if="${creater == 'null'}">新增</span>
        <span th:if="${creater != 'null'}">修改</span>
    </blockquote>
    <div class="layui-card">
        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" lay-filter="zmn-form">

                <div class="layui-card-header layui-margin-b"><b>基本信息</b></div>
                <div class="layui-form-item">
                    <label class="layui-form-label">投放类型：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <input type="radio" name="putType" id="putType" lay-filter="putType" th:each="item:${pushTypeList}"
                               th:value="${item.value}"
                               th:title="${item.text}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">投放APP：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="app"
                               th:each="item:${pushAppVts}"
                               th:title="${item.text}"
                               th:value="${item.value}"
                               lay-skin="primary">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">发布部门：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline">
                            <select name="deptOneId" id="deptOneId" lay-filter="deptOneId"
                                    lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${oneDept}"
                                        th:value="${item.value}"
                                        th:text="${item.text}">
                                </option>
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="deptTwoId" id="deptTwoId" lay-filter="deptTwoId"
                                    lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${twoDept}"
                                        th:value="${item.value}"
                                        th:text="${item.text}">
                            </select>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">所属分类：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline">
                            <select name="noticeCategoryId" id="noticeCategoryId" lay-filter="noticeCategoryId"
                                    lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${pushNoticeCategory}"
                                        th:value="${item.value}"
                                        th:text="${item.text}">
                                </option>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item" id="putNameTitle">
                    <label class="layui-form-label">推送标题：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs3">
                            <input type="text" name="putName" id="putName" lay-filter="putName" placeholder="请填写推送标题"
                                   autocomplete="off"
                                   maxlength="12"
                                   class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">不超过12个字符</div>
                    </div>
                </div>

                <div class="layui-form-item" id="putContentTitle">
                    <label class="layui-form-label">推送内容：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs3">
                            <textarea placeholder="请填写推送内容" name="putContent" id="putContent" lay-filter="putContent"
                                      maxlength="40"
                                      class="layui-textarea"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-mid layui-word-aux">不超过40个字符</div>
                </div>

                <div class="layui-form-item" id="picTitle">
                    <label class="layui-form-label" id="picTitleLabel">弹框图片：<span style="color: red">*</span></label>
                    <div class="layui-input-inline" style="text-align: center">
                        <div class="layui-upload-drag" id="picUrlView"
                             name="avatarSrcView">
                            <input type="hidden" name="picUrl" id="picUrl">
                            <i class="layui-icon"></i>
                            <p id="picTitleP">点击上传，弹框图片</p>
                        </div>
                        <!--删除 放大图片-->
                        <a href="javascript:;" class="layui-icon layui-icon-delete btn-del delete_image"></a>
                        <a href="javascript:;" style="cursor: pointer"
                           class="layui-icon layui-icon-search btn-review show_big_image"></a>
                    </div>
                    <div class="layui-form-mid layui-word-aux" id="picLabelMid"></div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">是否有跳转：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <input type="radio" lay-filter="isJump" name="isJump" th:each="item:${yesOrNo}"
                               th:value="${item.key}"
                               th:title="${item.value}">
                    </div>
                </div>
                <div class="layui-form-item" id="picLinkTitle">
                    <label class="layui-form-label">跳转链接：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs3">
                            <input type="text" name="picLink" id="picLink" lay-filter="picLink" placeholder="https://"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-col-xs3" style="margin-left: 5px">
                            <button type="button" lay-filter="stdlib" id="stdlib" class="layui-btn layui-btn-primary">标准库选择</button>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item" id="mustReadTitle">
                    <label class="layui-form-label">是否必须点击：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <input type="radio" name="mustRead" lay-filter="mustRead" th:each="item:${yesOrNo}"
                               th:value="${item.key}"
                               th:title="${item.value}">
                    </div>
                </div>

                <div class="layui-form-item" id="showTimeTitle">
                    <label class="layui-form-label">显示时长：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <input type="radio" name="showTime" th:each="item:${listShowTime}"
                               th:value="${item.value}"
                               th:checked="${item.value == 3}"
                               th:title="${item.text}">
                    </div>
                </div>

                <div class="layui-form-item" id="beginTimeTitle">
                    <label class="layui-form-label" id="beginTimeName">生效时间：<span style="color: red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" name="beginTime" lay-filter="beginTime" id="beginTime" autocomplete="off"
                               placeholder="yyyy-MM-dd HH:mm:ss"
                               class="layui-input"/>
                    </div>
                </div>

                <div class="layui-form-item" id="endTimeTitle">
                    <label class="layui-form-label">结束时间：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline">
                            <input type="text" name="endTime" lay-filter="endTime" id="endTime" autocomplete="off"
                                   placeholder="yyyy-MM-dd HH:mm:ss"
                                   class="layui-input"/>
                        </div>
                        <input type="checkbox" id="forLong" name="forLong"
                               lay-filter="forLong" lay-skin="primary" title="长期">
                    </div>
                </div>

                <div class="layui-form-item" id="userShowTimesAllTitle">
                    <label class="layui-form-label">用户显示总次数：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline">
                            <input type="number" name="userShowTimesAll" lay-filter="userShowTimesAll"
                                   id="userShowTimesAll" autocomplete="off"
                                   lay-verify="isPositiveNumber"
                                   class="layui-input"/>
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            次
                        </div>
                        <input type="checkbox" id="isUserShowTimesAll" name="isUserShowTimesAll"
                               lay-filter="isUserShowTimesAll"
                               lay-skin="primary" title="不限">
                    </div>
                </div>
                <div class="layui-form-item" id="userShowTimesDayTitle">
                    <label class="layui-form-label">用户每天显示次数：<span style="color: red">*</span></label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline">
                            <input type="number" name="userShowTimesDay" lay-filter="userShowTimesDay"
                                   id="userShowTimesDay" autocomplete="off"
                                   lay-verify="isPositiveNumber"
                                   class="layui-input"/>
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            次/天
                        </div>
                        <input type="checkbox" id="isUserShowTimesDay" name="isUserShowTimesDay"
                               lay-filter="isUserShowTimesDay" lay-skin="primary" title="不限">
                    </div>
                </div>

                <div class="layui-card-header layui-margin-b"><b>投放设置</b></div>

                <div class="layui-form-item">
                    <label class="layui-form-label">投放公司：</label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline" style="width: 250px">
                            <select name="putPlat" id="putPlat" lay-filter="putPlat"
                                    xm-select-height="36px"
                                    xm-select="putPlatList"
                                    lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${platTypeList}" th:value="${item.key}"
                                        th:text="${item.value}"></option>
                            </select>
                        </div>
                        <div class="layui-input-inline"  style="width: 250px">
                            <select name="putCompanyType" id="putCompanyType" lay-filter="putCompanyType"
                                    xm-select-height="36px"
                                    xm-select="putCompanyTypeList"
                                    lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${allCompanyType}" th:value="${item.key}"
                                        th:text="${item.value}"></option>
                            </select>
                        </div>
                        <div class="layui-input-inline"  style="width: 250px">
                            <select name="putCompanyId" id="putCompanyId" lay-filter="putCompanyId"
                                    xm-select-height="36px"
                                    xm-select="putCompanyIdList"
                                    lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${putCompanyIdList}" th:value="${item.value}"
                                        th:text="${item.text}"></option>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">投放城市：</label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline"  style="width: 250px">
                            <select name="putProvinceId" id="putProvinceId"
                                    xm-select="putProvinceIdList"
                                    xm-select-height="36px"
                                    lay-filter="putProvinceId" lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${allProvinceList}" th:value="${item.value}" th:text="${item.text}"></option>
                            </select>
                        </div>
                        <div class="layui-input-inline"  style="width: 250px">
                            <select name="putCityId" id="putCityId"
                                    xm-select-height="36px"
                                    xm-select="putCityIdList" lay-filter="putCityId" lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${allCityList}" th:value="${item.value}" th:text="${item.text}"></option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="width: 250px">
                            <select name="putCountyId" id="putCountyId"
                                    xm-select-height="36px"
                                    xm-select="putCountyIdList" lay-filter="putCountyId" lay-search="">
                                <option value="">直接选择或搜索选择</option>
                                <option th:each="item:${allCountyList}" th:value="${item.value}" th:text="${item.text}"></option>
                            </select>
                        </div>
                    </div>
                </div>

                <!--<div class="layui-form-item">-->
                    <!--<label class="layui-form-label">工程师分组：</label>-->
                    <!--<div class="layui-input-inline" style="width: 250px">-->
                        <!--<select name="putMasterGroup" id="putMasterGroup"-->
                                <!--xm-select="putMasterGroupList"-->
                                <!--xm-select-height="36px"-->
                                <!--lay-filter="putMasterGroup" lay-search="">-->
                            <!--<option value="">直接选择或搜索选择</option>-->
                            <!--<option th:each="item:${engineerGroup}" th:value="${item.value}"-->
                                    <!--th:text="${item.text}"></option>-->
                        <!--</select>-->
                    <!--</div>-->
                <!--</div>-->

                <div class="layui-form-item" id="releaseEngineer" th:if="${creater != 'null'}">
                    <label class="layui-form-label">投放工程师：</label>
                    <div class="layui-input-block">
                        <button type="button" id="importExcel" class="layui-btn layui-btn-primary">导入表格</button>
                        <a id="outPutTemplate" style="color: #00a0e9">下载模板</a>
                    </div>
                </div>

                <div class="layui-card-header layui-margin-b"><b>其他信息</b></div>

                <div class="layui-form-item">
                    <label class="layui-form-label">修改人/时间:</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid">[[${updater}]] / [[${updateTimeStr}]]</div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">创建人/时间:</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid">[[${creater}]] / [[${createTimeStr}]]</div>
                    </div>
                </div>
                <div class="layui-input-block">
                    <button class="layui-btn" type="button" lay-submit=""
                            id="zmn-form-submit"
                            lay-filter="zmn-form-submit">保存
                    </button>
                    <button class="layui-btn layui-btn-primary info-form-cancel"
                            id="zmn-form-cancel">取消
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
<link rel="stylesheet" href="/static/lay/style/formSelects-v4.css?v=1.1" media="all">
<script type="text/javascript" th:inline="javascript">
    let json = {
        pushNoticeApp: [[${pushNoticeApp}]],
        pushNoticeAppVo: [[${pushNoticeAppVo}]],
        ZMN_URL_ENV: [[${ZMN_URL_ENV}]]
    };
    layui.config({
        base: "/static/lay/",
        version: 202003210321211
    }).extend({
        index: "lib/index",
        push_notice_detail: "push/notice/zmn.push.notice.detail",
    }).use(['index', 'push_notice_detail']);
</script>